package com.beta.em.pay;

import org.apache.commons.lang3.StringUtils;

/**
 * Created by vector on 2016/12/6.
 */
public enum YeepayNotifyType {

    SERVER("SERVER", "服务器点对点通知"),
    REDIRECT("REDIRECT", "重定向通知");

    public final String value;
    public final String desc;

    YeepayNotifyType(String value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public static YeepayNotifyType getNotifyType(String value) {
        for (YeepayNotifyType notifyType: values()) {
            if (StringUtils.equals(notifyType.value, value)) {
                return notifyType;
            }
        }
        return null;
    }

}
